Imports System.Collections
Imports SchemaCodeGen

Partial Public Class pages_languages_usercontrols_UCLanguage : Inherits UserControl

#Region "Interface"
    Public Sub Display(ByVal [language] As CLanguage, sortedList as CLanguageList)
        If Parent.Controls.Count Mod 2 = 0 Then row.Attributes.Add("class", "alt_row")

        With [language]
			litNumber.Text = CStr(sortedList.IndexOf(language) + 1)
			lnkLanguageName.Text = CStr(IIF(.LanguageName.Length = 0, "...", .LanguageName))
			lnkLanguageName.NavigateUrl = CSitemap.Language(.LanguageId)

			lnkSetCount.Text = CUtilities.CountSummary(.TemplateSets, "pattern", "none")
			lnkSetCount.NavigateUrl = CSitemap.TemplateSets(.LanguageId)
			lnkSetCount.ToolTip = CUtilities.ListToString(.TemplateSets.Names, vbCrLf)

			lnkProjCount.Text = CUtilities.CountSummary(.ConnectionsCount, "project", "none")
			lnkProjCount.NavigateUrl = CSitemap.Connections(.LanguageId)
		End With
    End Sub
#End Region

End Class

